-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INSANE bugs #1463
INSANE bugs #1463
Conversation
It is still failing to find a root reference which, for example, YourKit displays:
I checked that implementing this TODO did not help, because diff --git a/harness/o.n.insane/src/org/netbeans/insane/impl/InsaneEngine.java b/harness/o.n.insane/src/org/netbeans/insane/impl/InsaneEngine.java
index e1a1b5b1ac..f47fbf1586 100644
--- a/harness/o.n.insane/src/org/netbeans/insane/impl/InsaneEngine.java
+++ b/harness/o.n.insane/src/org/netbeans/insane/impl/InsaneEngine.java
@@ -190,7 +190,12 @@ try {
//if (cls.getName().startsWith("org.netbeans.insane.scanner")) return; // skip refs from myself
ClassLoader cl = cls.getClassLoader();
- if ( cl != null) recognize(cl);
+ if (cl != null) {
+ if (filter.accept(cl, cls, null)) {
+ recognize(cl);
+ if (objects.isKnown(cl)) visitor.visitObjectReference(objects, cls, cl, /* cannot get a Field for Class.classLoader */ null);
+ }
+ }
// process only fields declared by this class,
// fields of all superclasses were already processed in separate run.
diff --git a/harness/o.n.insane/src/org/netbeans/insane/scanner/SimpleXmlVisitor.java b/harness/o.n.insane/src/org/netbeans/insane/scanner/SimpleXmlVisitor.java
index 2f48f271d4..cea5a72f45 100644
--- a/harness/o.n.insane/src/org/netbeans/insane/scanner/SimpleXmlVisitor.java
+++ b/harness/o.n.insane/src/org/netbeans/insane/scanner/SimpleXmlVisitor.java
@@ -120,7 +120,7 @@ public final class SimpleXmlVisitor implements Visitor {
}
private static String getFldName(Field fld) {
- return fld.getDeclaringClass().getName() + "." + fld.getName();
+ return fld == null ? "?" : fld.getDeclaringClass().getName() + "." + fld.getName();
}
So not sure why INSANE fails in this case. |
The changes are sane, I'm going to merge them. |
@lkishalmi |
Things that I bumped into while investigating jenkinsci/bom#77. I actually have a laundry list of INSANE issues to fix, but one thing at a time.